<template>
  <div class="app-container">
    <meta name="format-detection" content="telephone=yes" />

    <div>
      <van-nav-bar title="订单详情"
                   left-text="返回"
                   @click-left="onClickLeft"
                   left-arrow
      />
    </div>

    <div class="container">

          <!--<img :src="item.url" class="img"/>-->
          <van-image
            width="100%"
            height="100%"
            fit="contain"
            :src="orderInfo.imageUrl"
          />

      <div class="qybg">
        <div  class="qytitle">
          订单详情：
        </div>
        <div style="font-size: 16px;padding-left: 10px;padding-top: 10px;">
          <div style="padding-top: 10px;">产品名：{{orderInfo.productname}}</div>
          <div style="padding-top: 10px;">产品规格：{{orderInfo.skuname}}</div>
          <div style="padding-top: 10px;">产品单价：{{orderInfo.productPrice}}元</div>
          <div style="padding-top: 10px;">购买数量：{{orderInfo.productnum}}</div>
          <div style="padding-top: 10px;">总金额：
            <label style="color: red">{{orderInfo.totalprice}}元</label>
          </div>
          <div style="padding-top: 10px;">备注：{{orderInfo.message}}</div>
        </div>
      </div>

      <div class="qybg">
        <div  class="qytitle">
          收货信息：
        </div>
        <div>
          <div style="font-size: 16px;padding-top:  10px;padding-left: 10px;">
            收件人：{{orderInfo.sjrName}}   {{orderInfo.sjrTel}}
          </div>
          <div style="font-size: 16px;padding: 10px;padding-left: 10px;">
            详细地址：{{orderInfo.sjrAddress}}
          </div>

      </div>

    </div>
    </div>

  </div>
</template>

<script>
  import {queryShareInfo,addShareLy,queryShareLy,addShareStoreInfo ,addLyhfinfo,queryAgencyinfo,queryProductSku,queryAgenyAddress ,queryAddressById , saveAgencyOrder, queryOrderInfo  } from 'api/api'
  import {Toast} from 'vant'
  import eventBus from '../../utils/eventbus'
  export default {
    name: 'confirmOrder',
    data() {
      return {
        orderId:'',
        orderInfo:{}
      }
    },
    created() {
      this.orderId =  this.$route.query.orderId
      this.queryOrderInfo()
    },


    methods: {

      queryOrderInfo(){
        let param = {}
        let that = this
        param.orderId  = this.orderId
        queryOrderInfo(param).then(response => {
          if(response.code == 200 ){
            that.orderInfo = response.data
          }
        });

      },

      onClickLeft(){
        this.$router.go(-1) // 返回上一层
      },



    },

  }
</script>

<style scoped>

  .container{
    background-color: white;
  }

  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    height: 280px;
    text-align: center;
    background-color: #ffffff;
  }
  .img{
    height: 100%;
    width: 100%;
  }
  .qybg{
    width: 100%;
    background-color: #ffffff;
    padding:10px;
    margin-top: 5px;
    box-sizing:border-box;
  }
  .qytitle{
    font-size: 16px;
  }

  .text-class{
    color: #1989FA !important;
  }

</style>
